function [xa, ya] = getxycursor()
h_axes = findobj('tag', 'datawin1');
if(isempty(h_axes) || ~ishandle(h_axes))
    return;
end;
axinfo = get(h_axes, 'UserData'); % There may be information in userdata we can use
h_info = findobj('tag', 'datawin1_info');
msg_pos1 = get(h_info, 'pos');
if(isfield(axinfo, 'down_pos'))
    ax1 = axinfo.down_pos;
    ax2 = axinfo.up_pos;
else
    return;
end;
% and now redraw the display
u=get(gca, 'YLim');
if(ax1(1) == ax2(1))
    ax2(1) = ax1(1)+1;
end;
if(ax1(2) == ax2(2))
    ax2(2) = ax1(2)+1;
end;
xa = sort([ax1(1) ax2(1)]);
ya = sort([ax1(2) ax2(2)]);

